/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bs.Beans;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Bone
 */
@Entity
@Table(name = "bordero_detalhe")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "BorderoDetalhe.findAll", query = "SELECT b FROM BorderoDetalhe b")})
public class BorderoDetalhe implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(nullable = false)
    private Integer id;
    private Integer prazo;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "TAXA_JUROS", precision = 18, scale = 6)
    private BigDecimal taxaJuros;
    @Column(name = "VALOR_JUROS", precision = 18, scale = 6)
    private BigDecimal valorJuros;
    @Column(name = "VALOR_LIQUIDO", precision = 18, scale = 6)
    private BigDecimal valorLiquido;
    @Temporal(TemporalType.DATE)
    private Date vencimento;
    @JoinColumn(name = "ID_PARCELA_RECEBER", referencedColumnName = "ID", nullable = false)
    @ManyToOne(optional = false)
    private ParcelaReceber idParcelaReceber;
    @JoinColumn(name = "ID_BORDERO", referencedColumnName = "ID", nullable = false)
    @ManyToOne(optional = false)
    private BorderoCabecalho idBordero;

    public BorderoDetalhe() {
    }

    public BorderoDetalhe(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getPrazo() {
        return prazo;
    }

    public void setPrazo(Integer prazo) {
        this.prazo = prazo;
    }

    public BigDecimal getTaxaJuros() {
        return taxaJuros;
    }

    public void setTaxaJuros(BigDecimal taxaJuros) {
        this.taxaJuros = taxaJuros;
    }

    public BigDecimal getValorJuros() {
        return valorJuros;
    }

    public void setValorJuros(BigDecimal valorJuros) {
        this.valorJuros = valorJuros;
    }

    public BigDecimal getValorLiquido() {
        return valorLiquido;
    }

    public void setValorLiquido(BigDecimal valorLiquido) {
        this.valorLiquido = valorLiquido;
    }

    public Date getVencimento() {
        return vencimento;
    }

    public void setVencimento(Date vencimento) {
        this.vencimento = vencimento;
    }

    public ParcelaReceber getIdParcelaReceber() {
        return idParcelaReceber;
    }

    public void setIdParcelaReceber(ParcelaReceber idParcelaReceber) {
        this.idParcelaReceber = idParcelaReceber;
    }

    public BorderoCabecalho getIdBordero() {
        return idBordero;
    }

    public void setIdBordero(BorderoCabecalho idBordero) {
        this.idBordero = idBordero;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof BorderoDetalhe)) {
            return false;
        }
        BorderoDetalhe other = (BorderoDetalhe) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bs.Beans.BorderoDetalhe[ id=" + id + " ]";
    }
    
}
